// CommCmd.cpp: implementation of the CCommCmd class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "GameNetManager.h"
#include "CommCmd.h"
#include "CommFunc.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CCommCmd* CCommCmd::m_pInstance=NULL;
CCommCmd::CCommCmd()
{

}

CCommCmd::~CCommCmd()
{
	if(m_pInstance!=NULL)
	{
		delete m_pInstance;
		m_pInstance=NULL;
	}
} 

CCommCmd* CCommCmd::CreateInstance()
{
	if(m_pInstance==NULL)
	{
		m_pInstance=new CCommCmd();
	}
	return m_pInstance;
}

BOOL CCommCmd::ShellExe(CString strCmdLine)
{
	BOOL bResult=FALSE;
	//strCmdLine=_T("mstsc /console /v:192.168.0.6 /admin");
 	TCHAR cstrCmdLine[40]={0}; 
	_stprintf(cstrCmdLine,strCmdLine);
 	_tcscpy(cstrCmdLine,strCmdLine);
 	WinExec(cstrCmdLine, SW_SHOW);  
	return bResult;
}
